home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windows Expert
/
Windows Expert.iso
/
program
/
tpwpxeng.zip
/
RECNFLDS.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1991-07-22
|
599b
|
28 lines
program RecNFlds;
uses PXEngine, WinCrt;
const TableName = 'Table';
var PxErr: Integer;
TblHandle: TableHandle;
NFlds: Integer;
procedure PX(Code : integer);
begin
writeln(PXErrMsg(Code));
end;
begin
PX(PXWinInit('MyApp', pxShared));
PX(PXTblOpen(TableName, TblHandle, 0, False));
(* Determine number of fields in table *)
PxErr := PXRecNFlds(TblHandle, NFlds);
if PxErr <> PxSuccess then
Writeln(PxErrMsg(PxErr))
else Writeln('Number of fields in table ', TableName, ' is: ', NFlds);
PX(PXTblClose(TblHandle));
PX(PXExit);
end.